from django.contrib import admin
from production import models
from store import models as storeModels
# Register your models here.
from store.admin import OutboundRawDetailInline

@admin.register(models.ProductOrderModel)
class ProductOrderModelAdmin(admin.ModelAdmin):
       list_display = ('orderId','date','finished')
       # 搜索字段（支持入库单号、原料名称、原料代码搜索）
       search_fields = (
              'orderId',  # 关联入库单号
              'finished__name'  # 产品名称和代码
       )


@admin.register(models.ProductOrderOfIntermediateModel)
class ProductOrderOfIntermediateModelAdmin(admin.ModelAdmin):
       list_display = ('orderId','date','finished')
       # 搜索字段（支持入库单号、原料名称、原料代码搜索）
       search_fields = (
              'orderId',  # 关联入库单号
              'finished__name'  # 产品名称和代码
       )
